/**************************
 * \if English
 * @Date:2018.09.10
 * @Author:
 * @Brief:
 * @Detail:
 * @Editor:
 * @Brief:
 * \else
 *
 * @创建日期：2018年9月10日
 * @作者：hualei
 * @大概功能：MODBUS_START指令
**************************/
#include "modbustartinstruction.h"

ModbusStartInstruction::ModbusStartInstruction()
{
}

QDataStream& operator <<(QDataStream &out,ModbusStartInstruction &myVector)
{
    out << (quint32)myVector.instructionType << myVector.busId << (quint32)myVector.modbusType <<
           myVector.jmpLable << myVector.noteStr;

    return out;

}

QDataStream& operator >>(QDataStream &in, ModbusStartInstruction &myVector)
{
    quint32 instructionType;
    quint32 modbusType;

    in >> instructionType >> myVector.busId >> modbusType >> myVector.jmpLable >> myVector.noteStr;

    myVector.instructionType = (INSTRUCTION_TYPE)instructionType;
    myVector.modbusType = (E_MODBUS_SPEC_TYPE)modbusType;

    return in;
}
